﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HNMS.AgentBase
{
    public class AgentFactory
    {
        public static readonly AgentFactory Instance = new AgentFactory();
        private Dictionary<string, IAgent> AgentDic = new Dictionary<string, IAgent>();

        private AgentFactory()
        {
            //加载文件加中已经有的设备.dll 文件
        }

        public IAgent Create(string agentName)
        {
            return AgentDic.ContainsKey(agentName) ? (IAgent)AgentDic[agentName].Clone() : null;
        }
    }
}